from selenium import webdriver
from time import sleep
from selenium.webdriver.common.action_chains import ActionChains

try:
    driver = webdriver.Chrome()
    driver.get('https://www.baidu.com')

    driver.find_element_by_id('kw').send_keys('天和核心仓')
    # 左击
    element = driver.find_element_by_id('su')
    ActionChains(driver).click(element).perform()

    # 右击
    element = driver.find_element_by_id('kw')
    ActionChains(driver).context_click(element).perform()

    # 双击
    element = driver.find_element_by_id('kw')
    ActionChains(driver).double_click(element).perform()

except Exception as e:
    print(e)
finally:
    sleep(2)
    driver.quit()